<?php

$leftMenu = Menu::instance('admin-menu');

$rightMenu = Menu::instance('admin-menu-right');

/**
 * @see https://github.com/pingpong-labs/menus
 * 
 * @example adding additional menu.
 *
 * $leftMenu->url('your-url', 'The Title');
 * 
 * $leftMenu->route('your-route', 'The Title');
 */
$leftMenu->dropdown(trans('admin.menus.goods.title'), function ($sub) {
    $sub->route('admin.goods.index', trans('admin.menus.goods.all'), [], 1);
    $sub->route('admin.goods.create', trans('admin.menus.goods.create'), [], 2);
}, 2, ['icon' => 'fa fa-fort-awesome']);
$leftMenu->dropdown(trans('admin.menus.users.title'), function ($sub) {
        $sub->route('admin.users.index', trans('admin.menus.users.all'), [], 1);
        $sub->route('admin.users.create', trans('admin.menus.users.create'), [], 2);
        $sub->divider(3);
        $sub->route('admin.roles.index', trans('admin.menus.roles'), [], 4);
        $sub->route('admin.permissions.index', trans('admin.menus.permissions'), [], 5);
    }, 10, ['icon' => 'fa fa-users']);
$leftMenu->dropdown(trans('admin.menus.purchase.title'), function ($sub) {
    $sub->route('admin.purchase.index', trans('admin.menus.purchase.all'), [], 1);
    $sub->route('admin.purchase.create', trans('admin.menus.purchase.create'), [], 2);
}, 3, ['icon' => 'fa fa-truck fa-flip-horizontal']);

$leftMenu->dropdown(trans('admin.menus.shipment.title'), function ($sub) {
    $sub->route('admin.shipment.index', trans('admin.menus.shipment.all'), [], 1);
    $sub->route('admin.shipment.create', trans('admin.menus.shipment.create'), [], 2);
}, 4, ['icon' => 'fa fa-truck']);

$leftMenu->dropdown(trans('admin.menus.report.title'), function ($sub) {
    $sub->route('monthreport', '月报表', [], 1);
    $sub->route('yearReport', '年报表', [], 2);
}, 5, ['icon' => 'fa fa-area-chart']);